<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 贪婪模式 
        const str = '2023-07-13,2023-07-13,2023-07-13';

        const r = str.matchAll(/(\d{4})-(\d{2})-(\d{2})/g);

        console.log([...r]);








    </script>
</body>

</html>